/*
 * Copyright (c) 2020, 2023, 3044483124@qq.com All rights reserved.
 *
 */
package cn.GetFileType;

import java.io.File;

/**
 * <p>Project: JavaStudy - Test
 * <p>Powered by jiangbo On 2023-01-04
 * 16:27:51
 * <p>Created by IntelliJ IDEA
 *
 * @author jiangbo [3044483124@qq.com]
 * @version 1.0
 * @since 8/17
 */
public class Test {
    public static void main(String[] args) throws Exception {
        //故意把png文件的后缀改成txt,看是否能获取到真实文件格式
        final String file = String.valueOf(new File("C:\\Users\\30444\\Desktop\\北游.txt"));
        String name = GetFileTypeUtil.getType(file).name();
        System.out.println("文件的真实格式是" + name);
    }
}


